numbers=int(input())
wan=numbers//10000
qian=numbers//1000%10
bai=numbers//100%10
shi=numbers//10%10
ge=numbers%10
print(wan,qian,bai,shi,ge)
